welo git mirrors
Commit 6aa620c4ec6b59840a68f4b49e2f2bf13e02ac8c
Parents : 122f17f
Author : nuh uh <5c8d6d23d12a16532092511ac74122ae>
Signature : T66BB85Valid, signed by author
Date : 2026-07-21T20:04:46+01:00
exposed some of the option to change i2cp settings in i2pinterface config, and changed some of the default tunnel options when no setting is set
Changes
Diff
diff --git a/RNS/Interfaces/I2PInterface.py b/RNS/Interfaces/I2PInterface.py
index 532fafcb3..f84123b9b 100644
--- a/RNS/Interfaces/I2PInterface.py
+++ b/RNS/Interfaces/I2PInterface.py
@@ -145,7 +145,7 @@ class I2PController:
try:
async def tunnel_up():
RNS.log("Bringing up I2P tunnel to "+str(owner)+", this may take a while...", RNS.LOG_INFO)
- tunnel = self.i2plib.ClientTunnel(i2p_destination, owner.local_addr, sam_address=self.sam_address, loop=self.loop)
+ tunnel = self.i2plib.ClientTunnel(i2p_destination, owner.local_addr, sam_address=self.sam_address, loop=self.loop, options=owner.i2cp_options)
self.i2plib_tunnels[i2p_destination] = tunnel
await tunnel.run()
@@ -303,7 +303,7 @@ class I2PController:
try:
async def tunnel_up():
RNS.log(str(owner)+" Bringing up I2P endpoint, this may take a while...", RNS.LOG_INFO)
- tunnel = self.i2plib.ServerTunnel((owner.bind_ip, owner.bind_port), loop=self.loop, destination=i2p_dest, sam_address=self.sam_address)
+ tunnel = self.i2plib.ServerTunnel((owner.bind_ip, owner.bind_port), loop=self.loop, destination=i2p_dest, sam_address=self.sam_address, options=owner.i2cp_options)
self.i2plib_tunnels[i2p_b32] = tunnel
await tunnel.run()
owner.online = True
@@ -853,7 +853,21 @@ class I2PInterface(Interface):
ifac_size = c["ifac_size"] if "ifac_size" in c else None
ifac_netname = c["ifac_netname"] if "ifac_netname" in c else None
ifac_netkey = c["ifac_netkey"] if "ifac_netkey" in c else None
-
+
+ self.i2cp_options = {
+ "inbound.backupQuantity": c["inbound_backup_quantity"] if "inbound_backup_quantity" in c else 1,
+ "inbound.length": c["inbound_length"] if "inbound_length" in c else 2,
+ "inbound.quantity": c["inbound_quantity"] if "inbound_quantity" in c else 2,
+ "inbound.lengthVariance": c["inbound_length_variance"] if "inbound_length_variance" in c else 0,
+ "outbound.backupQuantity": c["outbound_backup_quantity"] if "outbound_backup_quantity" in c else 1,
+ "outbound.length": c["outbound_length"] if "outbound_length" in c else 2,
+ "outbound.quantity": c["outbound_quantity"] if "outbound_quantity" in c else 2,
+ "outbound.lengthVariance": c["outbound_length_variance"] if "outbound_length_variance" in c else 0,
+
+ "inbound.nickname": "Reticulum-Interface", # purely visual in the i2p console
+
+ } # this is both used client and server i2p hidden service tunnel config, the two configs could be seperated but most people won't care most likely and would probably be a footgun
+
self.HW_MTU = 1064
self.online = False
Served by rngit 1.5.1 - Generated in 0.05s